<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<!DOCTYPE html>
<html>
<head>
	<title>首页</title>
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<link type="text/css" rel="stylesheet" href="css/bootstrap.css">
	<link type="text/css" rel="stylesheet" href="css/style.css?v=12622">
	<script type="text/javascript" src="js/jquery.min.js"></script>
	<script type="text/javascript" src="js/bootstrap.min.js"></script>
	<script type="text/javascript" src="layer/layer.js"></script>
	<script type="text/javascript" src="js/cart.js"></script>
</head>
<body>
	
<!-- 头部 -->
<jsp:include page="/header.jsp">
	<jsp:param value="1" name="flag"/>
</jsp:include>

	<h1 align='center'><font size="6" face="幼圆">集点餐与推荐于一体的高校智慧食堂系统</font></h1>
	
	
	<!--banner
	<c:if test="${not empty scroll }">
		<div class="banner">
			<div class="container">
				<h2 class="hdng"><a href="${pageContext.request.contextPath }/goods_detail?id=${scroll.id }">${scroll.name }</a><span></span></h2>
				<p>今日精选推荐</p>
				<a class="banner_a" href="javascript:;" onclick="buy(${scroll.id })">立刻购买</a>
				<div class="banner-text">		
					<a href="${pageContext.request.contextPath }/goods_detail?id=${scroll.id }">
						<img src="${pageContext.request.contextPath }${scroll.cover}?id=${scroll.id }" alt="${scroll.name }" width="350" height="350">
					</a>	
				</div>
			</div>
		</div>
	</c:if>		
	-->	
	<div class="gallery">
		<div class="container">
			<div class="subscribe"></div>
		</div>
	</div>
	
	<c:if test="${not empty goodsList }">
	<div class="gallery">
		<div class="container">
			<div class="alert alert-danger">推荐专区</div>
			<div class="gallery-grids">
				
				<c:forEach items="${goodsList }" var="g">
				<div class="product-grid">
						<a href="${pageContext.request.contextPath }/goods_detail?id=${g.id}">				
							<div class="more-product"><span> </span></div>						
							<div class="product-img b-link-stripe b-animate-go  thickbox">
								<img src="${pageContext.request.contextPath }${g.cover}" class="img-responsive" alt="${g.name }" width="240" height="240">
								<div class="b-wrapper">
									<h4 class="b-animate b-from-left  b-delay03">							
										<button>查看详情</button>
									</h4>
								</div>
							</div>
						</a>				
						<div class="product-info simpleCart_shelfItem">
							<div class="product-info-cust prt_name">
								<h4>${g.name }</h4>								
								<span class="item_price">¥ ${g.price }</span>
								<input type="button" class="item_add items" value="加入购物车" onclick="buy(${g.id})">
								<div class="clearfix"> </div>
							</div>												
						</div>
					</div>
				</c:forEach>
			</div>
		</div>
		<div class="clearfix"></div>
		</c:if>
	
	<!--gallery-->
	<div class="gallery">
		<div class="container">
			<div class="alert alert-danger">热销推荐</div>
			<div class="gallery-grids">
				
				<c:forEach items="${hotList }" var="g">
				<div class="product-grid">
						<a href="${pageContext.request.contextPath }/goods_detail?id=${g.id}">				
							<div class="more-product"><span> </span></div>						
							<div class="product-img b-link-stripe b-animate-go  thickbox">
								<img src="${pageContext.request.contextPath }${g.cover}" class="img-responsive" alt="${g.name }" width="240" height="240">
								<div class="b-wrapper">
									<h4 class="b-animate b-from-left  b-delay03">							
										<button>查看详情</button>
									</h4>
								</div>
							</div>
						</a>				
						<div class="product-info simpleCart_shelfItem">
							<div class="product-info-cust prt_name">
								<h4>${g.name }</h4>								
								<span class="item_price">¥ ${g.price }</span>
								<input type="button" class="item_add items" value="加入购物车" onclick="buy(${g.id})">
								<div class="clearfix"> </div>
							</div>												
						</div>
					</div>
				</c:forEach>
			</div>
			
			
			<div class="clearfix"></div>
			<div class="alert alert-info">新品推荐</div>
			<div class="gallery-grids">	
				<c:forEach items="${newList }" var="g">
				<div class="product-grid">
						<a href="${pageContext.request.contextPath }/goods_detail?id=${g.id}">				
							<div class="more-product"><span> </span></div>						
							<div class="product-img b-link-stripe b-animate-go  thickbox">
								<img src="${pageContext.request.contextPath }${g.cover}" class="img-responsive" alt="${g.name }" width="240" height="240">
								<div class="b-wrapper">
									<h4 class="b-animate b-from-left  b-delay03">							
										<button>查看详情</button>
									</h4>
								</div>
							</div>
						</a>				
						<div class="product-info simpleCart_shelfItem">
							<div class="product-info-cust prt_name">
								<h4>${g.name }</h4>								
								<span class="item_price">¥ ${g.price }</span>
								<input type="button" class="item_add items" value="加入购物车" onclick="buy(${g.id})">
								<div class="clearfix"> </div>
							</div>												
						</div>
					</div>
				</c:forEach>
					
			</div>	
		</div>
	</div>
	<!--//gallery-->
	
	<!--subscribe-->
	<div class="clearfix"></div>
	<div class="gallery">
		<div class="container">
			<div class="subscribe2"></div>
		</div>
	</div>
	<!--//subscribe-->
	
	<!-- 尾部 -->
	<jsp:include page="/footer.jsp"></jsp:include>

</body>
</html>